package com.xrtn.controller;

import com.xrtn.service.IRecordService;
import com.xrtn.utils.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Api("特病相关接口")
@Controller
@RequestMapping("/special")
public class RecordAnswerController {

    @Autowired
    private IRecordService recordService;

    /**
     * 查询特病题目列表
     *
     * @return
     */
    @ApiOperation(value = "查询特病题目列表", notes = "查询特病题目列表")
    @RequestMapping(value = "/selectSpecialList", method = RequestMethod.GET)
    @ResponseBody
    public ResponseData selectSpecialList() {
        ResponseData data = new ResponseData();
        data.setResults(recordService.selectRecordAll());
        return data;
    }

//    /**
//     * 提交特病选项
//     *
//     * @return
//     */
//    @ApiOperation(value = "提交特病选项", notes = "提交特病选项")
//    @RequestMapping(value = "/saveSpecial", method = RequestMethod.POST)
//    @ResponseBody
//    public ResponseData saveSpecial(Integer userId, Integer patientId, Integer treatmentId, Integer doctorId, @RequestParam("infoIds[]") List<Integer> infoIds) {
//        ResponseData responseData = new ResponseData();
//        Map<String, Object> map = new HashMap<>();
//        map.put("userId", userId);
//        map.put("patientId", patientId);
//        map.put("treatmentId", treatmentId);
//        map.put("doctorId", doctorId);
//        map.put("infoIds", infoIds);
//        recordService.setRecordAnswer(map);
//        return responseData;
//    }

    public static void main(String[] args) {

    }

}
